<?php
class Show_360Model extends MongoModel {
	var $table = 'show_360';
    var $name = '360度产品展示';
    
    //-----------------360展示参数
    //最小的图片，规格是（缩小到最小时最大的图片规格，小于此规格后不再生成更小的缩略图）
    static $MIN_ZOOM_SIZE = 500;
    
    //每张切割图的最大规格
    static $SPLIT_SIZE = 500;
    
    /**
     * 随机序号，2个字符，用于
     */
    public static function gen_serial($count = 72){
    	$serial = array('00','01','02','03','04','05','06','07','08','09','a0','b0','c0','d0','e0','f0','g0','h0','i0','j0','k0','l0','m0','n0','o0','p0',
			'q0','r0','s0','t0','u0','v0','w0','x0','y0','z0','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p',
    		'1q','1r','1s','1t','1u','1v','1w','1x','1y','1z',
			'aa','ab','ac','ae','af','ag','ah','ai','aj','ak','al','am','an','ao','ap','aq','ar','ar','as','at','au','av','aw','ax','ay','az',
			'ba','bb','bc','bd','be','bf','bg','bh','bi','bj','bk','bl','bm','bn','bo','bp','bq','br','bs','bt','bu','bv','bw','bx','by','bz',
			'ca','cb','cc','cd','ce','cf','cg','ch','ci','cj','ck','cl','cm','cn','co','cp','cq','cr','cs','ct','cu','cv','cw','cx','cy','cz',
			'da','db','dc','dd','de','df','dg','dh','di','dj','dk','dl','dm','dn','do','dp','dq','dr','ds','dt','du','dv','dw','dx','dy','dz',
			'ea','eb','ec','ed','ee','ef','eg','eh','ei','ej','ek','el','em','en','eo','ep','eq','er','es','et','eu','ev','ew','ex','ey','ez',
			'fa','fb','fc','fd','fe','ff','fg','fh','fi','fj','fk','fl','fm','fn','fo','fp','fq','fr','fs','ft','fu','fv','fw','fx','fy','fz');
    	$rs = array_rand($serial, $count);
    	shuffle($rs);
    	$random_serial = array();
    	foreach($rs as $index){
    		$random_serial[] = $serial[$index];
    	}
    	return $random_serial;
    }
}

?>